﻿using FastData;
using M6R小圆柱注液机.Data;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace M6R小圆柱注液机.Pages
{
    public partial class ModePage : Form
    {
        public ModePage()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            GlobalValues.StatusVariable.isStartGRR = false;
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            //创建文件
            Method(GlobalValues.PathVariable.weight1_1);
            Method(GlobalValues.PathVariable.weight1_2);
            Method(GlobalValues.PathVariable.weight2_1);
            Method(GlobalValues.PathVariable.weight2_2);

            GlobalValues.StatusVariable.isStartGRR = true;

            this.Dispose();
            //GRRPage grr = new GRRPage();
            //grr.ShowDialog();
            //grr.Dispose();
        }

        private void Method(string path)
        {
            if (File.Exists(path))
            {
                File.Delete(path);
            }
            SaveStatic.FileExist(path);
        }

       
    }
}
